<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;


class SOrderInfo extends Model
{
    use SoftDeletes;
    public $table = "s_order_info";

    protected $fillable = [
        'user_id', 'info_id', 'info_type', 'get_type', 'pay_price', 'pay_type', 'actual_price', 'voucher_id','lesson_type_id', 'lesson_num', 'pay_time', 'created_at'
    ];

    public function users()
    {
        return $this->belongsTo('App\User', 'user_id');
    }


    public function cloudLessons()
    {
        return $this->belongsTo('App\Models\SCloudLessonInfo', 'info_id');
    }


    public function lessonTypes()
    {
        return $this->belongsTo('App\Models\SLessonType', 'lesson_type_id');
    }
}
